<!DOCTYPE html>
<html>

	<head>
		<meta charset="utf-8" />
		<title>创业股东列表</title>
		<link rel="stylesheet" href="__AGENT__/css/iconfont.css" />
		<link rel="stylesheet" href="__AGENT__/css/css.css" />
		<script src="__PUBLIC__/static/layui/layui.js" type="text/javascript" charset="utf-8"></script>
	</head>

	<body>
		{include file="public/header" /}
		<div class="index_conbox">
			<div class="index_content clearfix">
				{include file="public/lefter" /}
				<div class="right">
					<!--右侧内容-->
					<div class="rigtop">
						<span class="title">创业股东</span>
					</div>
					<div class="indrig_con" style="position: relative;">
						<div class="zizh_conbox" style="padding-top: 20px;">
							<!--选项卡内容开始-->
							<div class="zizh_con_1">
									<div class="chax_conbox">
										<div class="chax_jiegbt clearfix">
											<div class="chax_jieg">合伙人总计：{$list->total();}</div>
											{if $list->total()<20}
											<div class="chax_xzbtnbox">
												<button class="zizh_btn" type="button" onclick="pt_add()"><i class="iconfont icon-jia"></i>增加创业股东</button>
											</div>
											{/if}
										</div>
										<div class="chax_jiegnr">
											<table class="zizh_table1">
												<thead>
													<tr>
														<th>会员编号</th>
														<th class="w_20">姓名</th>
														<th class="w_10">手机号</th>
														<th class="w_10">推广会员数</th>
														<th class="w_10">累计会员</th>
														<th class="w_10">添加时间</th>
														<th class="w_20">操作</th>
													</tr>
												</thead>
												<tbody id="tbody">
													{volist name="$list" id="vo" }
													<tr>
														<td>{$vo.id}</td>
														<td>{$vo.user_name}</td>
														<td>{$vo.mobile}</td>
														<td>{$vo.b}</td>
														<td>{$vo.c}</td>
														<td>{$vo.pt_time}</td>
														<td>
															<a onclick="jiechu({$vo.id})" class="gray">解除</a>
														</td>
													</tr>
													{/volist}
													{if $list==null||count($list)==0}<tr><td colspan="10" style="text-align: center;">无创业股东信息</td></tr>{/if}
												</tbody>
											</table>
											<div class="fenye" style="display: block;">
												{$list->render()}
											</div>
										</div>
									</div>
							</div>
						</div>

					</div>
				</div>
			</div>
		</div>
		{include file="public/footer" /}

	</body>

</html>
<script>
	layui.use('laydate', function() {
		var laydate = layui.laydate;

		//日期控件
		laydate.render({
			elem: '#begin_time',
			type: 'datetime',
			format: 'yyyy-MM-dd HH:mm:ss'
		});

		laydate.render({
			elem: '#end_time',
			type: 'datetime',
			format: 'yyyy-MM-dd HH:mm:ss'
		});
	})
	function jiechu(id){
				var con = layer.confirm('确认解除创业股东资格?', function(index) {
				$.ajax({
					url:"{:url('accounts/jiechu')}",
					data: {
						id: id
					},
					success: function(data) {
						layer.msg(data.msg);
						layer.close(con);
						window.location.reload();
					}
				})
			});
		
	}
	

	//新增会员
	function pt_add() {
		layer.open({
			type: 2,
			title: '添加创业股东',
			shadeClose: true,
			shade: 0.8,
			area: ['400px', '250px'],
			content: "{:url('accounts/pt_add')}"
		});
	}
</script>